﻿@if (Request.IsAuthenticated)
{
<ul class="nav pull-right inline">
    <li>@Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })</li>
    <li>
        <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
    </li>
    @if (User.IsInRole("Admin"))
    {
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Settings
    <b class="caret"></b>
        </a>
        <ul class="dropdown-menu">
            <li>@Html.ActionLink("Manage Users", "UserManage", "Account")</li>
        </ul>
    </li>
    }
</ul>
    
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
{
    @Html.AntiForgeryToken()    
}

}
else
{
    <ul class="nav pull-right">
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
